
Partial Class GTSWeb_Shipment_Manage
    Inherits System.Web.UI.Page
    Private Description As String
    Private Begindate As Date
    Private EndDate As Date
    Private ShipmentNumber As String
    Private ShipmentData As GTSDAL.ShipmentDataTable

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If (Not IsPostBack) Then


        End If
    End Sub

    Protected Sub lnk_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnk.Click
        Try
            Dim ShipmentMgr As New GTSSystem.BLL.Shipment
            If (Not Date.TryParse(txtBeginDate.Text, Begindate)) Then
                Begindate = Convert.ToDateTime("1900/1/1")
            End If
            If (Not Date.TryParse(txtEndDate.Text, EndDate)) Then
                EndDate = DateTime.Today.AddYears(1)
            End If
            ShipmentNumber = txtReferenceNumber.Text
            Description = txtDescription.Text
            ShipmentData = ShipmentMgr.SearchShipments(Profile.BranchId, ShipmentNumber, Begindate, EndDate, Description)
            dgrSearchShipments.DataSource = ShipmentData
            dgrSearchShipments.DataBind()
        Catch ex As Exception
            lblMessage.Text = "System error <br/>." + ex.GetHashCode.ToString
        End Try
    End Sub
End Class
